package com.challenge.Kitchen;


import com.alibaba.fastjson.JSONObject;
import com.challenge.Constants.IConstants;
import com.challenge.Shelf.*;
import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

@Data
public class Kitchen {

    private ShelfContent shelfContent;
    SortShelf sortShelf;

    public Kitchen(String[] strs, Integer[] sizeArray) {
        Map map = new HashMap();
        for(int i=0; i<strs.length;i++) {
            HotShelf hotShelf = new HotShelf();
            hotShelf.setType(strs[i]);
            hotShelf.setSize(sizeArray[i]);
            map.put(strs[i], hotShelf);
        }
        sortShelf = new SortShelf();
        shelfContent = ShelfContent.getInstance(map);
    }

    public void kitchenShow(){
        System.out.println("now kitchen's content :" + JSONObject.toJSONString(this));
    }
}
